import request from '@/utils/request'
export function login(data) {
    return request({
        url: '/user/login',
        method: 'post',
        data
    })
}
export function logout() {
    return request({
        url: '/user/logout',
        method: 'post'
    })
}
export function  register(data) {
    return request({
        url: '/user/register',
        method: 'post',
        data
    })
}
export function findUser(query) {
    return request({
        url: '/user/getUserByPage',
        method: 'get',
        params:query
    })
}
export function delUser(query) {
    return request({
        url: '/user/deleteUserById',
        method: 'get',
        params:query
    })
}
// 批量删除
export function delBatch(query) {
    return request({
        url: '/user/deleteUsers',
        method: 'get',
        params:query
    })
}
// 添加
export function addUser(data) {
    return request({
        url: '/user/register',
        method: 'post',
        data
    })
}
// 修改
export function updateUser(data) {
    return request({
        url: '/user/updateUserById',
        method: 'post',
        data
    })
}
